package com.github.east196.terminator.cli;
import java.util.List;

import org.springframework.shell.standard.ShellComponent;
import org.springframework.shell.standard.ShellMethod;
import org.springframework.shell.standard.ShellOption;

import com.github.east196.terminator.xtend.meta.DocMetaParser;
import com.github.east196.terminator.xtend.model.Three;
@ShellComponent
public class Commands{
    @ShellMethod("sum函数")
    public int add(int param1,int param2,@ShellOption(defaultValue="0")String param3) {
        return param1+param2+Integer.parseInt(param3);
    }
    
    /**
     * 中文显示有问题
     * @param file
     * @return
     */
    @ShellMethod("meta函数‪")
    public List<Three> meta(String file) {
    	return new DocMetaParser().action(file);
    }
}